import request from '@/utils/request'

// 查询拼团活动列表
export function listJoinGroup(query) {
  return request({
    url: '/csmshop/joinGroup/list',
    method: 'get',
    params: query
  })
}

// 查询拼团活动详细
export function getJoinGroup(gaId) {
  return request({
    url: '/csmshop/joinGroup/' + gaId,
    method: 'get'
  })
}

// 新增拼团活动
export function addJoinGroup(data) {
  return request({
    url: '/csmshop/joinGroup',
    method: 'post',
    data: data
  })
}

// 修改拼团活动
export function updateJoinGroup(data) {
  return request({
    url: '/csmshop/joinGroup',
    method: 'put',
    data: data
  })
}

// 删除拼团活动
export function delJoinGroup(gaId) {
  return request({
    url: '/csmshop/joinGroup/' + gaId,
    method: 'delete'
  })
}
